package com.pinyoumei.app.adapter;

import android.content.Context;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.style.ImageSpan;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.pinyoumei.app.R;
import com.pinyoumei.app.bean.SecondBean;
import com.pinyoumei.app.bean.SectionBean;

import java.util.List;

import de.hdodenhof.circleimageview.CircleImageView;

/**
 * Created by Administrator on 2021-08-09.
 * --------- 日期 ------- 维护人 ------------ 变更内容 --------
 * 2021-08-09        Administrator             新增Person类
 * 2021-08-09        Administrator             增加sex属性
 */
public class SecondTopAdapter extends BaseQuickAdapter<SectionBean.SectionDto, BaseViewHolder> {
    private Context context;
    public SecondTopAdapter(Context context,int layoutResId, @Nullable List<SectionBean.SectionDto> data) {
        super(layoutResId, data);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, SectionBean.SectionDto item) {

        helper.setText(R.id.top_item_txt,item.getSection_name());

        if (item.isSelect()){
            helper.setVisible(R.id.top_item_line,true);
            helper.setTextColor(R.id.top_item_txt,context.getResources().getColor(R.color.color_018d47));
        }else{
            helper.setVisible(R.id.top_item_line,false);
            helper.setTextColor(R.id.top_item_txt,context.getResources().getColor(R.color.black));
        }
    }




}
